<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:replace="common/common :: confJscss"/>
</head>
<body>
<div class="layui-card-body " th:fragment="new_order_no_grid_rob_order">
    <form method="POST" action="" class="layui-form" lay-filter="zmn-rob-order-form" id="zmn-rob-order-form">
        <hr  class="layui-bg-gray">
        <div class="layui-card">
            <div class="layui-card-header">城市信息：</div>
            <div class="layui-card-body layui-form">
                <div class="layui-form-item">
                    <label class="layui-form-label">省市</label>
                    <div class="layui-input-block">
                        <div class="layui-inline">
                            <div id="noGridRobOrderProvince" style="width: 180px;"></div>
                        </div>
                        <div class="layui-inline">
                            <div id="noGridRobOrderCity" style="width: 180px;"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="layui-card">

            <div class="layui-card-header">抢单状态:</div>
            <div class="layui-card-body">
                <div class="layui-row">
                    <div class="layui-col-sm10 layui-form">
                        <div class="layui-form-item">
                            <label class="layui-form-label"></label>
                            <div class="layui-input-inline" style="width: 100px">
                                <input type="checkbox" id="robOrderStatus" name="robOrderStatus"
                                       lay-verify="required"
                                       lay-filter="robOrderStatus"
                                       lay-text="ON|OFF"
                                       lay-skin="switch"
                                       value="2"
                                       th:checked="${noGridRobOrderObj.robOrderStatus == 2}"/>
                            </div>
                            <div class="layui-form-mid layui-word-aux">针对：新单&普通派单，打开状态，即：只会判断基础条件</div>
                        </div>
                    </div>
                </div>
                <div class="layui-card-header">抢单条件:（以下设置条件都满足才抢单）</div>
                <div class="layui-card-header robRequiredGroupHeader" >工程师设置:</div>
                <div class="layui-row">
                    <div class="layui-col-sm10 layui-form">
                        <div class="layui-form-item">
                            <label class="layui-form-label" ></label>
                            <div class="layui-input-inline">
                                <input type="checkbox" id="engineerCompanyTypeOfOne" title="子公司"
                                       lay-skin="primary"
                                       value="1"
                                       th:checked="${noGridRobOrderObj.engineerCompanyTypeOfSubsidiary}">
                                <input type="checkbox" id="engineerCompanyTypeOfTwo" title="家修匠"
                                       lay-skin="primary"
                                       value="2"
                                       th:checked="${noGridRobOrderObj.engineerCompanyTypeOfHomeRepairman}">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-row">
                    <div class="layui-col-sm10 layui-form">
                        <div class="layui-form-item">
                            <label class="layui-form-label layui-form-required">工程师类型:</label>
                            <div class="layui-input-inline">
                                <select  autocomplete="off" name="engineerTypeOf">
                                    <option >请选择工程师</option>
                                    <option th:value="${item.key}"
                                            th:text="${item.value}"
                                            th:selected="${item.key == noGridRobOrderObj.engineerType}"
                                            th:each="item:${engineerList}">
                                </select>
                            </div>
                            <div class="layui-form-mid layui-word-aux">当仅有此类型工程师时，工单将按抢单方式分配</div>
                        </div>
                    </div>
                </div>

                <div class="layui-card-header robRequiredGroupHeader">抢单距离:</div>
                <div class="layui-row">
                    <div class="layui-col-sm10 layui-form">
                        <div class="layui-form-item">
                            <label class="layui-form-label layui-form-required" style="width: 200px">无网格工程师最大抢单距离:</label>
                            <div class="layui-input-inline" style="width: 240px">
                                <input  class="layui-input" type="text" name="maxRobDistance"
                                        placeholder="请输入1-100范围内的整数"
                                        autocomplete="off"
                                        lay-verify="required|maxNoGridRobOrderLimit"
                                        lay-verType="tips"
                                        th:value="${noGridRobOrderObj.maxRobDistance}"/>
                            </div>
                            <span style="display: inline-block; height: 34px; line-height: 34px; color: #666">km</span>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label layui-form-required" style="width: 200px">无网格最大派单距离:</label>
                            <div class="layui-input-inline" style="width: 240px">
                                <input class="layui-input" type="text" name="maxDistributeDistance"
                                       placeholder="请输入5-100范围内5的倍数的整数"
                                       autocomplete="off"
                                       lay-verify="required|maxNoGridDistributeLimit"
                                       lay-verType="tips"
                                       th:value="${noGridRobOrderObj.maxDistributeDistance}" >
                            </div>
                            <span style="display: inline-block; height: 34px; line-height: 34px; color: #666">km</span>
                        </div>
                    </div>
                </div>

                <div class="layui-card-header robRequiredGroupHeader">取消设置:</div>
                <div class="layui-row">
                    <div class="layui-col-sm12 layui-form">
                        <div class="layui-form-item">
                            <label class="layui-form-label layui-form-required">在</label>
                            <div class="layui-input-inline">
                                <input class="layui-input" name="cancelTime" id="cancelTime"
                                       type="text"
                                       autocomplete="off"
                                       lay-verify="required"/>
                            </div>
                            <label class="layui-form-label" style="width: 300px">下单的订单,若无工程师抢单,需在
                                <u id="underLineTime"
                                   th:text="${noGridRobOrderObj.cancelTimeEnd != null ? noGridRobOrderObj.cancelTimeEnd: '08:00'}">08:00</u>点后等待</label>
                            <div class="layui-input-inline" style="width: 100px">
                                <input class="layui-input" type="text" name="cancelTimeAfter" id="cancelTimeAfter"
                                       autocomplete="off"
                                       placeholder="请输入大于0的整数"
                                       style="font-size: 8px"
                                       lay-verify="required|cancelTimeAfterLimit"
                                       lay-verType="tips"
                                       th:value="${noGridRobOrderObj.cancelTimeAfter}" >
                            </div>
                            <label class="layui-form-label" style="width: 110px">分钟,自动取消。</label>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label"></label>
                            <div class="layui-form-mid layui-word-aux">注：正常时间段内下单的订单，若无工程师抢单，按正常下单时间起，同样等待
                                <span id="spanTip"
                                      th:text="${noGridRobOrderObj.cancelTimeAfter != null ? noGridRobOrderObj.cancelTimeAfter: '60'}">60</span>分钟，自动取消
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <zmn th:if="${noGridRobOrderObj.nonGridConfigId>0}">
                <div class="layui-card-header layui-margin-b"><b>其他信息</b></div>

                <div class="layui-form-item layui-form-item-sm">
                    <label class="layui-form-label">修改人/时间：</label>
                    <div class="layui-input-block">
                        <div class="layui-form-mid layui-word-aux"
                             th:text="${noGridRobOrderObj.updater} + '&nbsp;/&nbsp;' + ${#dates.format(noGridRobOrderObj.updateTime, 'yyyy-MM-dd HH:mm:ss')}">
                            修改人/时间
                        </div>
                    </div>
                </div>
                <div class="layui-form-item layui-form-item-sm">
                    <label class="layui-form-label">创建人/时间：</label>
                    <div class="layui-input-block">
                        <div class="layui-form-mid layui-word-aux"
                             th:text="${noGridRobOrderObj.creater} + '&nbsp;/&nbsp;' + ${#dates.format(noGridRobOrderObj.createTime, 'yyyy-MM-dd HH:mm:ss')}">
                            创建人/时间
                        </div>
                    </div>
                </div>
            </zmn>

            <div class="layui-card-header"></div>
            <div class="layui-row">
                <div class="layui-col-sm10">
                    <div class="layui-form-item submit">
                        <div class="layui-input-block">
                            <button class="layui-btn " lay-submit="" lay-filter="zmn-noGrid-rob-order-form-submit">提交
                            </button>
                            <button type="button" id="cancel" class="layui-btn layui-btn-primary">取消</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
</body>
</html>